package com.example.smart.ui.activity.today_circle

import com.example.lib.extend.gridManager
import com.example.lib.extend.setOnDoubleClickListener
import com.example.lib.utils.ToastUtils
import com.example.lib.utils.statusbar.StatusBarUtils
import com.example.smart.R
import com.example.smart.adapter.other.ChooseImageAdapter
import com.example.smart.base.ui.activity.BaseActivity
import com.example.smart.databinding.ActivityPostBinding
import com.example.smart.utils.handler.HandUtils

class PostActivity : BaseActivity<ActivityPostBinding>() {
    private val mImageAdapter by lazy {
        ChooseImageAdapter(this@PostActivity)
    }

    override fun layoutID() = R.layout.activity_post

    override fun initView() {
        StatusBarUtils.setStateAndNavigationBar(this@PostActivity,
            statusBarColor = com.example.lib.R.color.black_ececf8)
        binding.Recycler.gridManager(3)
        binding.Recycler.adapter = mImageAdapter
    }

    override fun initListener() {
        binding.Send.setOnDoubleClickListener {
            ToastUtils.showToast("发布成功")
            HandUtils.postTask({
                finish()
            }, 1000)
        }
    }
}